package yaq.mini.weibo.leafwb.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface KeyWordMapper {
    @Select("select * from keyword")
    List<String> listKeyWord();

    @Select("select * from keyword where keyword=#{keyword}")
    String isKeyWord(String keyword);

    @Update("update keyword set keyword=#{newKeyword} where keyword=#{keyword}")
    int update(String keyword,String newKeyword);

    @Delete("delete from keyword where keyword=#{keyword}")
    int delete(String keyword);

    @Insert("insert into keyword values(#{keyword})")
    int insert(String keyword);
}
